-- GENERATED SPELL FOR [Coilfang Slavehandler] --


function spell0_17959(pUnit, Event) --@Hamstring,n/a--
pUnit:FullCastSpellOnTarget(9080,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_17959', 10259, 1)
end

function spell1_17959(pUnit, Event) --@Head Crack,n/a--
pUnit:FullCastSpellOnTarget(16172,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_17959', 20287, 1)
end

function spell2_17959(pUnit, Event) --@Slap!,n/a--
pUnit:FullCastSpellOnTarget(6754,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_17959', 3288, 1)
end

function Sorts_17959(pUnit, Event)
local choix_sorts_17959 = math.random(0, 2)
if choix_sorts_17959 == 0 then
pUnit:RegisterEvent('spell0_17959', 1, 1)
end
if choix_sorts_17959 == 1 then
pUnit:RegisterEvent('spell1_17959', 1, 1)
end
if choix_sorts_17959 == 2 then
pUnit:RegisterEvent('spell2_17959', 1, 1)
end
end

function mob17959_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_17959', math.random(1500, 3000), 1)
end

function mob17959_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob17959_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob17959_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(17959, 1, 'mob17959_Action')
RegisterUnitEvent(17959, 2, 'mob17959_Leave')
RegisterUnitEvent(17959, 3, 'mob17959_Kill')
RegisterUnitEvent(17959, 4, 'mob17959_Die')
